import {Component, OnInit} from '@angular/core';
import {SiteService} from './service/site.service';
import {Site} from './entity/site';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
    site: Site;

    constructor(private siteService: SiteService) {
    }

    ngOnInit(): void {
        this.siteService.get().subscribe(site => {
            this.site = site;
        });
    }
}
